package com.woniuxy.platform.core.controller;


import com.woniuxy.common.CommonResult;
import com.woniuxy.platform.core.model.PmMessageStyle;
import com.woniuxy.platform.core.service.PmMessageStyleService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author gmx
 * @since 2021-07-15
 */
@RestController
@RequestMapping("/pmMessageStyle")
public class PmMessageStyleController {

    @Resource
    private PmMessageStyleService service;


    @GetMapping("getMessageStyle")
    public CommonResult getMessageStyle(){
        List<PmMessageStyle> list = this.service.list();
        if (list == null){
            return CommonResult.fail("查新消息类型失败");
        }
        return CommonResult.success(list);
    }

}

